import request from "@/utils/request";

// 消息通知列表
export function listNotice(data) {
  return request({
    url: "/systemNotice/listNotice",
    method: "GET",
    params: data,
  });
}

// 设置所有消息为已读
export function noticeAllSetRead() {
  return request({
    url: "/systemNotice/noticeAllSetRead",
    method: "POST",
  });
}
// 设置消息为已读
export function noticeSetRead(id) {
  return request({
    url: `/systemNotice/noticeSetRead/${id}`,
    method: "POST",
  });
}
// /mall-admin
export function createEmail(data) {
  return request({
    url: `/email/createEmail`,
    method: "POST",
    data,
  });
}

export function queryCounts() {
  return request({
    url: `/email/queryCounts`,
    method: "POST",
  });
}

// /mall-admin
export function emailList(data) {
  return request({
    url: `/email/receiveList`,
    method: "GET",
    params: data,
  });
}
// /mall-admin/email/sendList
export function sendList(data) {
  return request({
    url: `/email/sendList`,
    method: "GET",
    params: data,
  });
}

// /mall-admin
export function mocelList() {
  return request({
    url: `/help/mocelList`,
    method: "GET",
  });
}

// /mall-admin
export function helpList(data) {
  return request({
    url: `/help/list`,
    method: "GET",
    params: data,
  });
}

export function createHelp(data) {
  return request({
    url: `/help/create`,
    method: "POST",
    data,
  });
}

export function updateHelp(data) {
  return request({
    url: `/help/update`,
    method: "POST",
    data,
  });
}

// /mall-admin/help/delete/{id}
export function deleteHelp(id) {
  return request({
    url: `/help/delete/${id}`,
    method: "POST",
  });
}

// /mall-admin
export function queryDocumentCounts() {
  return request({
    url: `/document/queryCounts`,
    method: "POST",
  });
}

// /mall-admin/document/receiveList
export function queryDocumentreceiveList(data) {
  return request({
    url: `/document/receiveList`,
    method: "GET",
    params: data,
  });
}

// /mall-admin/document/sendList
export function documentsendList(data) {
  return request({
    url: `/document/sendList`,
    method: "GET",
    params: data,
  });
}
// /mall-admin/document/create
export function createdocument(data) {
  return request({
    url: `/document/create`,
    method: "POST",
    data,
  });
}

// /mall-admin/policy/list
export function policyList(data) {
  return request({
    url: `/policy/list`,
    method: "GET",
    params: data,
  });
}

// /mall-admin/policy/create
export function createpolicy(data) {
  return request({
    url: `/policy/create`,
    method: "POST",
    data,
  });
}

//mall-admin/policy/update
export function updatepolicy(data) {
  return request({
    url: `/policy/update`,
    method: "POST",
    data,
  });
}

//mall-admin/policy/delete/{id}
export function deletePolicy(id) {
  return request({
    url: `/policy/delete/${id}`,
    method: "POST",
  });
}

//mall-admin/document/delete/{id}
export function documentDelete(id) {
  return request({
    url: `/document/delete/${id}`,
    method: "POST",
  });
}
//mall-admin/document/upate
export function documentupate(data) {
  return request({
    url: `/document/upate`,
    method: "POST",
    data,
  });
}

// /mall-admin/notice/list

export function noticeList(data) {
  return request({
    url: `/notice/list`,
    method: "GET",
    params: data,
  });
}

// /mall-admin/notice/create
export function createNotice(data) {
  return request({
    url: `/notice/create`,
    method: "POST",
    data,
  });
}

// /mall-admin/notice/update

export function updateNotice(data) {
  return request({
    url: `/notice/update`,
    method: "POST",
    data,
  });
}

// /mall-admin/notice/delete/{id}
export function noticeDelete(id) {
  return request({
    url: `/notice/delete/${id}`,
    method: "POST",
  });
}
